-
Notifications
You must be signed in to change notification settings - Fork 1.4k
🌱 Improve mark hook utils #12994
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
🌱 Improve mark hook utils #12994
Conversation
a5f7631 to
55a23d5
Compare
|
/test pull-cluster-api-e2e-main-gke |
|
/hold I'll take another look myself on Monday, but PR is ready for review |
|
/hold cancel All good /assign @fabriziopandini |
| if !updateResourceVersionOnObject { | ||
| obj = obj.DeepCopyObject().(client.Object) | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| if !updateResourceVersionOnObject { | |
| obj = obj.DeepCopyObject().(client.Object) | |
| } | |
| // In some cases it is preferred to not update resourceVersion in the input object, | |
| // because this could lead to conflict errors e.g. when patching at the end of a reconcile loop. | |
| if !updateResourceVersionOnObject { | |
| obj = obj.DeepCopyObject().(client.Object) | |
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same in MarkAsDone/MarkAsOkToDelete
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added
55a23d5 to
1c2aeaa
Compare
fabriziopandini
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
/approve
|
LGTM label has been added. Git tree hash: 805520d85d305d7e856787e5c4191c7d3c05c3e7
|
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: fabriziopandini The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
What this PR does / why we need it:
Removes patchHelper to avoid unnecessary resource usage and gives callers a choice if the resourceVersion on the passed-in object should be updated.
Which issue(s) this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)format, will close the issue(s) when PR gets merged):Fixes #